import request from '@/utils/request'

// 获取报检单
export function ipqcinspection(data){
	return request({
		url: '/api/Business/ipqcinspection',
		method: 'get',
		data
	})
}

// 确认报检单
export function ConfirmInspectionByCode(data){
	return request({
		url:'/api/Business/ipqcinspection/confirm',
		method:	'post',
		data
	})
}

// 删除报检单
export function DeleteInspectionById(id){
	return request({
		url:'/api/Business/ipqcinspection/' + id,
		method: 'delete'
	})
}

//关闭检验批
export function CloseInspectionById(id){
	return request({
		url:'/api/Business/ipqcinspection/close/' + id,
		method: 'post'
	})
}

// 获取所有物料信息
export function GetMaterialGroup(){
	return request({
		url:'/api/BaseData/material/All',
		method:'get'
	})
}

// 获取检验类型
export function GetInspectType(){
	return request({
		url:'/api/system/dictionarydata/458162035063023429/Data/Selector',
		method:'get'
	})
}

// 获取工厂信息
export function GetQmsBaseFactorystructure(){
	return request({
		url:'/api/BaseData/QmsBaseFactorystructure/Selector/0',
		method:'get'
	})
}

// 获取检验方案
export function Getcheckcard(){
	return request({
		url:'/api/BaseData/checkcard/All',
		method:'get'
	})
}

// 获取工序信息
export function GetModeling(){
	return request({
		url:'/api/BaseData/modeling',
		method:'get'
	})
}

// 获取编辑信息
export function GetEditInfo(id){
	return request({
		url: '/api/Business/ipqcinspection/'+id,
		method:'get'
	})
}

// 新增制程报检单
export function InsertIPQCInspection(data){
	return request({
		url: '/api/Business/ipqcinspection',
		method:'post',
		data
	})
}

// 更新制程报检单
export function InsertIPQCInspectionPut(id,data){
	return request({
		url: '/api/Business/ipqcinspection/' + id,
		method:'put',
		data
	})
}